xen/build: Use C99 booleans
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 13 Jul 2016 13:55:48 +0000 (14:55 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 15 Jul 2016 09:52:36 +0000 (10:52 +0100)
commit920234259475bbcd1136afeed7e0f3867e860ffb
treee4b7c5434d9d39e3b9cb705da02a3c19c1094e7c
parent4ef815bf611d4ea0e1a4718e7f446f57767def61
xen/build: Use C99 booleans

and switch bool_t to being of type _Bool rather than char.

Using bool_t as char causes several subtle problems; first that a bool_t
actually has more than two values, and that (bool_t)0x100 actually has the
value 0 rather than the expected 1, due to truncation.

Making this change reveals two bugs now caught by the compiler.
errata_c6_eoi_workaround() actually makes use of bool_t having more than two
states, while generic_apic_probe() has a integer in the middle of a compound
bool_t assignment (which triggers a [-Werror=parentheses] warning on Debian
Jessie).

Finally, it turns out that ARM is mixing and matching bool_t and bool, despite
their different semantics.  This change brings the semantics of bool_t to
match bool, but does not alter the current mix.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/arm/p2m.c
xen/arch/arm/platforms/xgene-storm.c
xen/arch/arm/traps.c
xen/arch/x86/acpi/cpu_idle.c
xen/arch/x86/genapic/probe.c
xen/include/asm-arm/types.h
xen/include/asm-x86/types.h
xen/include/xen/device_tree.h
xen/include/xen/types.h